package com.etone.smartAudit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.etone.smartAudit.domain.ItemExpansionSource;
import com.etone.smartAudit.vo.item.ItemSourceUsedVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 蒋学伟
 * @create: 2020-07-16 10:53:03
 * @Description 项目扩容资源管理
 */
@Mapper
public interface ItemExpansionSourceMapper extends BaseMapper<ItemExpansionSource> {
    /**
     * 批量新增
     *
     * @param itemExpansionSources
     * @return
     */
    int batchInsert(@Param("itemExpansionSources") List<ItemExpansionSource> itemExpansionSources);


    /**
     * 根据项目id删除扩容资源
     *
     * @param itemId
     * @return
     */
    int deleteByItemId(@Param("itemId") Integer itemId);

    /**
     * 查看项目资源申请扩容总情况
     *
     * @param itemId
     * @return
     */
    List<ItemSourceUsedVO> itemSourceApplyTotal(@Param("itemId") Integer itemId);
}
